package cn.yfxu.controller;


import io.swagger.annotations.Api;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.*;

import java.lang.invoke.MethodType;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2020-11-23
 */
@RestController
@Api(value = "测试swagger")
@RequestMapping("/appearincm")
@Log4j2
public class AppearincmController {


    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String hello(){
         return "hello";
     }

     @RequestMapping(value = "/log",method = RequestMethod.GET)
    public String Log(){
         log.error("d121312");
         return "11221";
     }
    @RequestMapping(value = "/exception",method = RequestMethod.GET)
    public String nullPointerExceptionHandler() throws Exception {
       throw new Exception("测试异常");
    }
}
